package com.zjj.filmcommentapi.utils;

/**
 * 返回的状态码，信息
 */
public class CodeMsg {
    private int code;
    private String msg;

    private CodeMsg( ) {
    }
    private CodeMsg( int code,String msg ) {
        this.code = code;
        this.msg = msg;
    }
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
    /**
     * 通用码
     */
    public static CodeMsg SUCCESS = new CodeMsg(200, "success");
    public static CodeMsg SERVER_ERROR = new CodeMsg(500, "服务端异常");
    public static CodeMsg BIND_ERROR = new CodeMsg(501, "参数校验异常：%s");
    public static CodeMsg EXIST_ERROR = new CodeMsg(502, "账号已存在");
}
